const Koa = require('koa')
const bodyParser = require('koa-bodyparser')
const registerAllRouters = require('../router')

const app = new Koa()

// 解析参数中间件
app.use(bodyParser())

// 注册所有路由中间件
registerAllRouters(app)

module.exports = app